package com.yangxk.kadmin.web.common.datascope;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * 数据权限参数
 * @author yangxk
 * @date 2019/2/1 17:34
 */
@Getter
@Setter
@NoArgsConstructor
public class DataScopeParam<T extends Number> {

    // 限制数据权限的字段名称
    private String fieldName = "dept_id";
    // 需要限制的表别名
    private String tableAlias;

    // 具体的数据范围
    private List<T> limitNumbers;

    public DataScopeParam(String fieldName, List<T> limitNumbers) {
        this.fieldName = fieldName;
        this.limitNumbers = limitNumbers;
    }

    public DataScopeParam(List<T> limitNumbers) {
        this.limitNumbers = limitNumbers;
    }
}
